{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 对活动进行聚类\n",
    "第四周和第五周的作业均数据来源于Kaggle竞赛：Event Recommendation Engine Challenge，根据\n",
    "events they’ve responded to in the past\n",
    "user demographic information\n",
    "what events they’ve seen and clicked on in our app\n",
    "用户对某个事件是否感兴趣\n",
    "\n",
    "竞赛官网：\n",
    "https://www.kaggle.com/c/event-recommendation-engine-challenge/data\n",
    "\n",
    "活动描述信息在events.csv文件：共110维特征\n",
    "前9列：event_id, user_id, start_time, city, state, zip, country, lat, and lng.\n",
    "event_id：活动的id, \n",
    "user_id：创建活动的用户的id .  \n",
    "city, state, zip, and country： 活动地点 (如果知道的话).\n",
    "lat and lng： floats（活动地点的经度和纬度）\n",
    "start_time： 字符串，ISO-8601 UTC time，表示活动开始时间\n",
    "\n",
    "后101列为词频：count_1, count_2, ..., count_100，count_other\n",
    "count_N：活动描述出现第N个词的次数\n",
    "count_other：除了最常用的100个词之外的其余词出现的次数\n",
    "\n",
    "作业要求：\n",
    "根据活动的关键词（count_1, count_2, ..., count_100，count_other属性）做聚类，可采用KMeans聚类\n",
    "尝试K=10，20，30，..., 100, 并计算各自CH_scores。\n",
    "\n",
    "提示：由于样本数目较多，建议使用MiniBatchKMeans。\n",
    "文件说明：\n",
    "1.\t可以先运行0. EDA.ipynb，看一下竞赛所有数据的情况；\n",
    "2.\t总体活动的数目太多（300w+记录），可以只需对训练集train.csv和测试集test.cv出现的活动（13418条记录）举行聚类即可。运行1. Users_Events.ipynb可得到只在训练集train.csv和测试集test.cv出现的活动，可自己修改代码存为csv格式，在进行聚类。\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 导入工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T11:28:26.300027Z",
     "start_time": "2018-11-02T11:28:21.422748Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "#保存数据\n",
    "import pickle\n",
    "\n",
    "import itertools\n",
    "\n",
    "#处理事件字符串\n",
    "import datetime\n",
    "\n",
    "import numpy as np\n",
    "import scipy.io as sio\n",
    "import scipy.sparse as ss\n",
    "import pandas as pd\n",
    "\n",
    "#相似度/距离\n",
    "import scipy.spatial.distance as ssd\n",
    "\n",
    "from collections import defaultdict\n",
    "from sklearn.preprocessing import normalize\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 读取 1. Users_Events这个文件中自己增加代码导出的CSV格式文件(PE_eventIndex.csv)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "因为作业要求里有提到总体活动的数目太多（300w+记录），可以只需对训练集train.csv和测试集test.cv出现的活动（13418条记录）举行聚类即可。所以，将Users_Events整理出来的13418条记录的索引读进来，方便后续关联有300w+记录的events.csv数据集。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 从PE_eventIndex.csv中读取训练集和测试集中出现的event"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T11:28:31.064299Z",
     "start_time": "2018-11-02T11:28:28.499152Z"
    }
   },
   "outputs": [],
   "source": [
    "eventID = pd.read_csv(\"PE_eventIndex.csv\")\n",
    "#把读进来的dataframe转为字典类型，以便后续查找比对event_id\n",
    "dict_eventID = eventID.set_index('event_id').T.to_dict('list')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T11:28:31.236309Z",
     "start_time": "2018-11-02T11:28:31.070299Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{3822409571: [0],\n",
       " 3323334871: [1],\n",
       " 873946502: [2],\n",
       " 3317835950: [3],\n",
       " 4000779658: [4],\n",
       " 1986487861: [5],\n",
       " 1992220874: [6],\n",
       " 774093053: [7],\n",
       " 3146118530: [8],\n",
       " 2877011901: [9],\n",
       " 3645508095: [10],\n",
       " 3887323073: [11],\n",
       " 2981167077: [12],\n",
       " 627006212: [13],\n",
       " 3992740948: [14],\n",
       " 1270829015: [15],\n",
       " 3217594704: [16],\n",
       " 2846528802: [17],\n",
       " 551112142: [18],\n",
       " 1619986209: [19],\n",
       " 3932617564: [20],\n",
       " 3802316845: [21],\n",
       " 1549252317: [22],\n",
       " 3780075220: [23],\n",
       " 2958853320: [24],\n",
       " 845956763: [25],\n",
       " 3819085498: [26],\n",
       " 3304837598: [27],\n",
       " 2503553114: [28],\n",
       " 3554778591: [29],\n",
       " 2038842201: [30],\n",
       " 1547028922: [31],\n",
       " 97210112: [32],\n",
       " 319129729: [33],\n",
       " 3284996128: [34],\n",
       " 2725326747: [35],\n",
       " 1464985006: [36],\n",
       " 2659777896: [37],\n",
       " 387537657: [38],\n",
       " 762464570: [39],\n",
       " 3488779034: [40],\n",
       " 2512346948: [41],\n",
       " 2988315064: [42],\n",
       " 4058374704: [43],\n",
       " 945439689: [44],\n",
       " 3420542143: [45],\n",
       " 2333203361: [46],\n",
       " 3897815885: [47],\n",
       " 1275435478: [48],\n",
       " 1605098821: [49],\n",
       " 3974790590: [50],\n",
       " 1391017105: [51],\n",
       " 48324615: [52],\n",
       " 2474879380: [53],\n",
       " 1654106477: [54],\n",
       " 1133639860: [55],\n",
       " 3722242006: [56],\n",
       " 4192032295: [57],\n",
       " 3004007968: [58],\n",
       " 167252762: [59],\n",
       " 2153348068: [60],\n",
       " 345576099: [61],\n",
       " 1969283585: [62],\n",
       " 153477774: [63],\n",
       " 968434069: [64],\n",
       " 4250931903: [65],\n",
       " 970593998: [66],\n",
       " 3584210334: [67],\n",
       " 2585193676: [68],\n",
       " 3538627205: [69],\n",
       " 521858421: [70],\n",
       " 880342205: [71],\n",
       " 1019287013: [72],\n",
       " 3253996490: [73],\n",
       " 3364940341: [74],\n",
       " 3445542629: [75],\n",
       " 1926015481: [76],\n",
       " 1251514213: [77],\n",
       " 1685778212: [78],\n",
       " 2620915673: [79],\n",
       " 1460702001: [80],\n",
       " 3052123229: [81],\n",
       " 2408267303: [82],\n",
       " 1666413374: [83],\n",
       " 67012143: [84],\n",
       " 998267429: [85],\n",
       " 916627849: [86],\n",
       " 1433072169: [87],\n",
       " 453336060: [88],\n",
       " 2427346312: [89],\n",
       " 1499053881: [90],\n",
       " 3868972599: [91],\n",
       " 2139975650: [92],\n",
       " 3887437420: [93],\n",
       " 3831365201: [94],\n",
       " 4123041728: [95],\n",
       " 3382162822: [96],\n",
       " 3247396557: [97],\n",
       " 1162247222: [98],\n",
       " 3890023938: [99],\n",
       " 1999425207: [100],\n",
       " 3653847990: [101],\n",
       " 3094003586: [102],\n",
       " 711902059: [103],\n",
       " 2301447401: [104],\n",
       " 2412119621: [105],\n",
       " 973265170: [106],\n",
       " 1203705291: [107],\n",
       " 2823348542: [108],\n",
       " 2247273347: [109],\n",
       " 3969985283: [110],\n",
       " 1423412400: [111],\n",
       " 2342980834: [112],\n",
       " 803811392: [113],\n",
       " 2486303679: [114],\n",
       " 118274123: [115],\n",
       " 1138326567: [116],\n",
       " 1206970605: [117],\n",
       " 3316899955: [118],\n",
       " 2054614790: [119],\n",
       " 682028179: [120],\n",
       " 1249049803: [121],\n",
       " 2475079669: [122],\n",
       " 1466293065: [123],\n",
       " 527590182: [124],\n",
       " 772123111: [125],\n",
       " 2057068023: [126],\n",
       " 916138104: [127],\n",
       " 895286028: [128],\n",
       " 2825324217: [129],\n",
       " 3292387762: [130],\n",
       " 2337118881: [131],\n",
       " 1620441934: [132],\n",
       " 1507639278: [133],\n",
       " 2793309582: [134],\n",
       " 303459881: [135],\n",
       " 2963144429: [136],\n",
       " 3673272503: [137],\n",
       " 667664881: [138],\n",
       " 3632090303: [139],\n",
       " 724214959: [140],\n",
       " 1820258245: [141],\n",
       " 4102628773: [142],\n",
       " 902611522: [143],\n",
       " 731731924: [144],\n",
       " 3745079581: [145],\n",
       " 1878241082: [146],\n",
       " 3974066619: [147],\n",
       " 3287951899: [148],\n",
       " 2328060612: [149],\n",
       " 3242166240: [150],\n",
       " 1035926205: [151],\n",
       " 1103713679: [152],\n",
       " 236560165: [153],\n",
       " 2350533042: [154],\n",
       " 1118457299: [155],\n",
       " 1179672480: [156],\n",
       " 3712070556: [157],\n",
       " 2131593904: [158],\n",
       " 2041845174: [159],\n",
       " 370451063: [160],\n",
       " 3618189475: [161],\n",
       " 2104037286: [162],\n",
       " 4183544021: [163],\n",
       " 2575078889: [164],\n",
       " 150342414: [165],\n",
       " 1304578765: [166],\n",
       " 3541987715: [167],\n",
       " 142847450: [168],\n",
       " 445373500: [169],\n",
       " 1236371399: [170],\n",
       " 1343164833: [171],\n",
       " 1963766612: [172],\n",
       " 1647310583: [173],\n",
       " 2259285302: [174],\n",
       " 1369337496: [175],\n",
       " 2078674354: [176],\n",
       " 315405402: [177],\n",
       " 1509619943: [178],\n",
       " 1711830550: [179],\n",
       " 4029785203: [180],\n",
       " 2201545594: [181],\n",
       " 3522246891: [182],\n",
       " 929809053: [183],\n",
       " 472699259: [184],\n",
       " 2696649330: [185],\n",
       " 1106103765: [186],\n",
       " 2672657798: [187],\n",
       " 461456549: [188],\n",
       " 941988517: [189],\n",
       " 2255036161: [190],\n",
       " 753115138: [191],\n",
       " 2762265640: [192],\n",
       " 2168969773: [193],\n",
       " 2556346032: [194],\n",
       " 148481382: [195],\n",
       " 2235916835: [196],\n",
       " 2900719315: [197],\n",
       " 312824157: [198],\n",
       " 2983692212: [199],\n",
       " 2845303452: [200],\n",
       " 2931338514: [201],\n",
       " 403097256: [202],\n",
       " 218663179: [203],\n",
       " 1332759137: [204],\n",
       " 1294070735: [205],\n",
       " 3293015360: [206],\n",
       " 3022311573: [207],\n",
       " 1055406820: [208],\n",
       " 816254504: [209],\n",
       " 3481660815: [210],\n",
       " 2491721612: [211],\n",
       " 199908595: [212],\n",
       " 4083994402: [213],\n",
       " 2809607334: [214],\n",
       " 2221249291: [215],\n",
       " 4145665238: [216],\n",
       " 348631044: [217],\n",
       " 1064284965: [218],\n",
       " 2353865263: [219],\n",
       " 3999157860: [220],\n",
       " 3597169763: [221],\n",
       " 2460468313: [222],\n",
       " 2997075790: [223],\n",
       " 1338752348: [224],\n",
       " 1077779810: [225],\n",
       " 1384112836: [226],\n",
       " 3917524398: [227],\n",
       " 1928569785: [228],\n",
       " 2126954914: [229],\n",
       " 3068622773: [230],\n",
       " 939563341: [231],\n",
       " 417123290: [232],\n",
       " 3920148761: [233],\n",
       " 914456218: [234],\n",
       " 1729757002: [235],\n",
       " 3241272469: [236],\n",
       " 4265093803: [237],\n",
       " 3317149544: [238],\n",
       " 2491530958: [239],\n",
       " 3653935661: [240],\n",
       " 2021865435: [241],\n",
       " 1518229543: [242],\n",
       " 1142237118: [243],\n",
       " 2772019284: [244],\n",
       " 601084101: [245],\n",
       " 4083904591: [246],\n",
       " 1995510429: [247],\n",
       " 1234887619: [248],\n",
       " 2576646497: [249],\n",
       " 2952103933: [250],\n",
       " 175933138: [251],\n",
       " 4294677286: [252],\n",
       " 1985340464: [253],\n",
       " 1643010658: [254],\n",
       " 310352532: [255],\n",
       " 4053437619: [256],\n",
       " 3183669415: [257],\n",
       " 2025853498: [258],\n",
       " 1711604318: [259],\n",
       " 4128174743: [260],\n",
       " 3656008998: [261],\n",
       " 600370874: [262],\n",
       " 3203638855: [263],\n",
       " 1811322299: [264],\n",
       " 634388536: [265],\n",
       " 3583375355: [266],\n",
       " 2179267582: [267],\n",
       " 908427583: [268],\n",
       " 1598694827: [269],\n",
       " 3920186473: [270],\n",
       " 2251550828: [271],\n",
       " 2887226822: [272],\n",
       " 4182255726: [273],\n",
       " 3368979284: [274],\n",
       " 1494513322: [275],\n",
       " 3698731704: [276],\n",
       " 389674816: [277],\n",
       " 771109311: [278],\n",
       " 192254554: [279],\n",
       " 802011068: [280],\n",
       " 1986891478: [281],\n",
       " 2425916002: [282],\n",
       " 3676123091: [283],\n",
       " 27702695: [284],\n",
       " 750220836: [285],\n",
       " 1927387740: [286],\n",
       " 1409394408: [287],\n",
       " 1485857067: [288],\n",
       " 2766617713: [289],\n",
       " 2652503309: [290],\n",
       " 1447011169: [291],\n",
       " 754494201: [292],\n",
       " 2622371373: [293],\n",
       " 3911022906: [294],\n",
       " 826832481: [295],\n",
       " 2129619079: [296],\n",
       " 681219745: [297],\n",
       " 3325090658: [298],\n",
       " 4198989765: [299],\n",
       " 938329092: [300],\n",
       " 1767661989: [301],\n",
       " 912469932: [302],\n",
       " 3297792743: [303],\n",
       " 2952666575: [304],\n",
       " 2485173442: [305],\n",
       " 2921274626: [306],\n",
       " 844053363: [307],\n",
       " 29180020: [308],\n",
       " 3276213471: [309],\n",
       " 2252007144: [310],\n",
       " 2110752121: [311],\n",
       " 1953437515: [312],\n",
       " 1398443663: [313],\n",
       " 1734815968: [314],\n",
       " 3595820764: [315],\n",
       " 1716470668: [316],\n",
       " 2560867051: [317],\n",
       " 238152389: [318],\n",
       " 3908056289: [319],\n",
       " 1404633374: [320],\n",
       " 3431177382: [321],\n",
       " 3954561766: [322],\n",
       " 258916451: [323],\n",
       " 1134231092: [324],\n",
       " 3931516549: [325],\n",
       " 2558272675: [326],\n",
       " 2306874322: [327],\n",
       " 1368913485: [328],\n",
       " 2531209279: [329],\n",
       " 1576119037: [330],\n",
       " 999770277: [331],\n",
       " 826675497: [332],\n",
       " 543299546: [333],\n",
       " 3912782817: [334],\n",
       " 1550429882: [335],\n",
       " 102026311: [336],\n",
       " 2951156726: [337],\n",
       " 2393389779: [338],\n",
       " 3951849347: [339],\n",
       " 3941838661: [340],\n",
       " 524333092: [341],\n",
       " 4002607728: [342],\n",
       " 2124576111: [343],\n",
       " 1046898997: [344],\n",
       " 1261557576: [345],\n",
       " 1461681213: [346],\n",
       " 999690702: [347],\n",
       " 3096404071: [348],\n",
       " 1439955445: [349],\n",
       " 1446467556: [350],\n",
       " 1619445765: [351],\n",
       " 736433133: [352],\n",
       " 1383850843: [353],\n",
       " 4082601014: [354],\n",
       " 1354053551: [355],\n",
       " 1397855471: [356],\n",
       " 2279531372: [357],\n",
       " 4251121485: [358],\n",
       " 61186519: [359],\n",
       " 4277141562: [360],\n",
       " 476693272: [361],\n",
       " 2851922487: [362],\n",
       " 3540481566: [363],\n",
       " 151129683: [364],\n",
       " 322219501: [365],\n",
       " 1791133471: [366],\n",
       " 1776131749: [367],\n",
       " 1357901187: [368],\n",
       " 2853909310: [369],\n",
       " 3920130677: [370],\n",
       " 4006924083: [371],\n",
       " 1825576882: [372],\n",
       " 697674217: [373],\n",
       " 491118104: [374],\n",
       " 3552123379: [375],\n",
       " 3392885130: [376],\n",
       " 3311162737: [377],\n",
       " 2456190311: [378],\n",
       " 1204240464: [379],\n",
       " 705007381: [380],\n",
       " 1053535074: [381],\n",
       " 4218102720: [382],\n",
       " 1330332438: [383],\n",
       " 4227721355: [384],\n",
       " 199746426: [385],\n",
       " 3413431385: [386],\n",
       " 79214950: [387],\n",
       " 392166594: [388],\n",
       " 721698640: [389],\n",
       " 2573518736: [390],\n",
       " 2758697837: [391],\n",
       " 1665286634: [392],\n",
       " 3100489591: [393],\n",
       " 1470187263: [394],\n",
       " 2329324806: [395],\n",
       " 228340462: [396],\n",
       " 4023489552: [397],\n",
       " 278426484: [398],\n",
       " 3902750267: [399],\n",
       " 1978124272: [400],\n",
       " 921030522: [401],\n",
       " 1488068589: [402],\n",
       " 4144714322: [403],\n",
       " 586190898: [404],\n",
       " 2105392706: [405],\n",
       " 3244922451: [406],\n",
       " 990256291: [407],\n",
       " 1290394920: [408],\n",
       " 2530713176: [409],\n",
       " 1329447487: [410],\n",
       " 2402098473: [411],\n",
       " 2571050863: [412],\n",
       " 2279603197: [413],\n",
       " 2367684478: [414],\n",
       " 1520335024: [415],\n",
       " 138523229: [416],\n",
       " 1409053740: [417],\n",
       " 3244133531: [418],\n",
       " 1179474743: [419],\n",
       " 1556502972: [420],\n",
       " 598096100: [421],\n",
       " 1783683714: [422],\n",
       " 3039652825: [423],\n",
       " 3734663956: [424],\n",
       " 496131340: [425],\n",
       " 2314011851: [426],\n",
       " 1480755794: [427],\n",
       " 1305006038: [428],\n",
       " 2418142030: [429],\n",
       " 2000752208: [430],\n",
       " 822271136: [431],\n",
       " 3508849684: [432],\n",
       " 927695082: [433],\n",
       " 3045260404: [434],\n",
       " 2221417081: [435],\n",
       " 1492911169: [436],\n",
       " 3041742790: [437],\n",
       " 2685878625: [438],\n",
       " 3996685669: [439],\n",
       " 2654475121: [440],\n",
       " 22235632: [441],\n",
       " 3210876036: [442],\n",
       " 25712446: [443],\n",
       " 1407744396: [444],\n",
       " 4097011060: [445],\n",
       " 3399493403: [446],\n",
       " 3350595681: [447],\n",
       " 2681780384: [448],\n",
       " 1428402454: [449],\n",
       " 2015438787: [450],\n",
       " 2325712717: [451],\n",
       " 1009537353: [452],\n",
       " 2150848115: [453],\n",
       " 2436352210: [454],\n",
       " 3308814501: [455],\n",
       " 2913407142: [456],\n",
       " 383563223: [457],\n",
       " 4079544335: [458],\n",
       " 2129255857: [459],\n",
       " 4198665344: [460],\n",
       " 620931168: [461],\n",
       " 1143671570: [462],\n",
       " 2772929791: [463],\n",
       " 242676861: [464],\n",
       " 3902259528: [465],\n",
       " 3659992710: [466],\n",
       " 512403156: [467],\n",
       " 2922727848: [468],\n",
       " 2541362268: [469],\n",
       " 1330949688: [470],\n",
       " 733783189: [471],\n",
       " 1357264754: [472],\n",
       " 2769506511: [473],\n",
       " 3883069165: [474],\n",
       " 1363545588: [475],\n",
       " 879365424: [476],\n",
       " 660949763: [477],\n",
       " 400356575: [478],\n",
       " 139221822: [479],\n",
       " 1940265937: [480],\n",
       " 1333696176: [481],\n",
       " 2271777730: [482],\n",
       " 913255694: [483],\n",
       " 379197377: [484],\n",
       " 4156197678: [485],\n",
       " 688003497: [486],\n",
       " 4241216275: [487],\n",
       " 3318802055: [488],\n",
       " 3784929022: [489],\n",
       " 679660942: [490],\n",
       " 2274349979: [491],\n",
       " 4088363232: [492],\n",
       " 1170112049: [493],\n",
       " 2200684348: [494],\n",
       " 1630489177: [495],\n",
       " 3963798906: [496],\n",
       " 3005548418: [497],\n",
       " 2411388169: [498],\n",
       " 1983888102: [499],\n",
       " 900649983: [500],\n",
       " 606856804: [501],\n",
       " 2355101450: [502],\n",
       " 947356866: [503],\n",
       " 3444724802: [504],\n",
       " 1206747600: [505],\n",
       " 1740282438: [506],\n",
       " 1057272870: [507],\n",
       " 4153011100: [508],\n",
       " 653825038: [509],\n",
       " 806826749: [510],\n",
       " 1303026980: [511],\n",
       " 1299206322: [512],\n",
       " 594975095: [513],\n",
       " 158205194: [514],\n",
       " 1507489572: [515],\n",
       " 96095826: [516],\n",
       " 1561841388: [517],\n",
       " 2419496401: [518],\n",
       " 439311946: [519],\n",
       " 3685386977: [520],\n",
       " 976975428: [521],\n",
       " 3009383497: [522],\n",
       " 3102156677: [523],\n",
       " 679148240: [524],\n",
       " 1341535889: [525],\n",
       " 2354857659: [526],\n",
       " 3233419825: [527],\n",
       " 820270984: [528],\n",
       " 1542554878: [529],\n",
       " 1019900859: [530],\n",
       " 4108357970: [531],\n",
       " 2006563795: [532],\n",
       " 3247802991: [533],\n",
       " 1091316601: [534],\n",
       " 4150407592: [535],\n",
       " 3199229320: [536],\n",
       " 1677917066: [537],\n",
       " 1580455386: [538],\n",
       " 2075203466: [539],\n",
       " 652541886: [540],\n",
       " 3499523914: [541],\n",
       " 3008017580: [542],\n",
       " 836475546: [543],\n",
       " 721858430: [544],\n",
       " 1301391714: [545],\n",
       " 3366499153: [546],\n",
       " 1817785599: [547],\n",
       " 2138641915: [548],\n",
       " 4159151915: [549],\n",
       " 3982608480: [550],\n",
       " 1623900702: [551],\n",
       " 2167282999: [552],\n",
       " 1977475739: [553],\n",
       " 1894169490: [554],\n",
       " 3519129293: [555],\n",
       " 2118368309: [556],\n",
       " 1309770679: [557],\n",
       " 3707695875: [558],\n",
       " 781765501: [559],\n",
       " 569616021: [560],\n",
       " 2181644863: [561],\n",
       " 3537990440: [562],\n",
       " 1892245781: [563],\n",
       " 2592001236: [564],\n",
       " 1582951351: [565],\n",
       " 1418335588: [566],\n",
       " 2953583082: [567],\n",
       " 2107071578: [568],\n",
       " 211855807: [569],\n",
       " 2029840938: [570],\n",
       " 3802870894: [571],\n",
       " 2529350528: [572],\n",
       " 146533907: [573],\n",
       " 3383737148: [574],\n",
       " 1944497323: [575],\n",
       " 1570124449: [576],\n",
       " 3223228633: [577],\n",
       " 1093387036: [578],\n",
       " 716205857: [579],\n",
       " 2936557254: [580],\n",
       " 297856962: [581],\n",
       " 3680209340: [582],\n",
       " 2086300822: [583],\n",
       " 934970634: [584],\n",
       " 1956101005: [585],\n",
       " 2624001814: [586],\n",
       " 532334247: [587],\n",
       " 3492020204: [588],\n",
       " 771425652: [589],\n",
       " 2611575896: [590],\n",
       " 1563973355: [591],\n",
       " 3637421376: [592],\n",
       " 3494504561: [593],\n",
       " 4091868183: [594],\n",
       " 191271461: [595],\n",
       " 3704285397: [596],\n",
       " 3034533222: [597],\n",
       " 2261000241: [598],\n",
       " 3681892474: [599],\n",
       " 3557171468: [600],\n",
       " 4073832558: [601],\n",
       " 1221934300: [602],\n",
       " 1446660181: [603],\n",
       " 3036141504: [604],\n",
       " 520657921: [605],\n",
       " 670599422: [606],\n",
       " 1061411905: [607],\n",
       " 4102767305: [608],\n",
       " 3948162966: [609],\n",
       " 852362805: [610],\n",
       " 514880482: [611],\n",
       " 4060638267: [612],\n",
       " 4043705370: [613],\n",
       " 3217855831: [614],\n",
       " 364572656: [615],\n",
       " 428794879: [616],\n",
       " 2951622929: [617],\n",
       " 2188669255: [618],\n",
       " 3982727529: [619],\n",
       " 598832150: [620],\n",
       " 3145096544: [621],\n",
       " 3572215281: [622],\n",
       " 2920583393: [623],\n",
       " 1656059935: [624],\n",
       " 2054616566: [625],\n",
       " 593744182: [626],\n",
       " 2732461028: [627],\n",
       " 3972620098: [628],\n",
       " 3732784795: [629],\n",
       " 530243426: [630],\n",
       " 41642879: [631],\n",
       " 431169924: [632],\n",
       " 1364682420: [633],\n",
       " 3066321838: [634],\n",
       " 1239204675: [635],\n",
       " 3495437070: [636],\n",
       " 3717432238: [637],\n",
       " 3668324750: [638],\n",
       " 2893363609: [639],\n",
       " 2746202243: [640],\n",
       " 2212723194: [641],\n",
       " 3701320707: [642],\n",
       " 4212324250: [643],\n",
       " 724636212: [644],\n",
       " 234197631: [645],\n",
       " 3384785057: [646],\n",
       " 1119811894: [647],\n",
       " 2178152313: [648],\n",
       " 3913331948: [649],\n",
       " 4182465191: [650],\n",
       " 1785998532: [651],\n",
       " 4086658384: [652],\n",
       " 2218232029: [653],\n",
       " 2748209109: [654],\n",
       " 1888712494: [655],\n",
       " 2674578873: [656],\n",
       " 342284187: [657],\n",
       " 2221479214: [658],\n",
       " 1439164638: [659],\n",
       " 3051088984: [660],\n",
       " 3399444894: [661],\n",
       " 1854380763: [662],\n",
       " 1613656858: [663],\n",
       " 608092517: [664],\n",
       " 2046775840: [665],\n",
       " 3175951362: [666],\n",
       " 1102811972: [667],\n",
       " 1126679093: [668],\n",
       " 2846542700: [669],\n",
       " 2725806125: [670],\n",
       " 2798516620: [671],\n",
       " 1993199919: [672],\n",
       " 2422316321: [673],\n",
       " 2980258101: [674],\n",
       " 2715282469: [675],\n",
       " 3256932963: [676],\n",
       " 3826153788: [677],\n",
       " 3627567817: [678],\n",
       " 2466666653: [679],\n",
       " 655936955: [680],\n",
       " 4217652951: [681],\n",
       " 3354053703: [682],\n",
       " 1611840162: [683],\n",
       " 1979059717: [684],\n",
       " 507707719: [685],\n",
       " 2492433817: [686],\n",
       " 352751137: [687],\n",
       " 3493348543: [688],\n",
       " 2393885244: [689],\n",
       " 3436797348: [690],\n",
       " 3997076581: [691],\n",
       " 3113660150: [692],\n",
       " 979018642: [693],\n",
       " 2304176660: [694],\n",
       " 3120537018: [695],\n",
       " 4200954298: [696],\n",
       " 3175590309: [697],\n",
       " 4178616155: [698],\n",
       " 1956181522: [699],\n",
       " 1955207789: [700],\n",
       " 2526773363: [701],\n",
       " 2520169151: [702],\n",
       " 770278298: [703],\n",
       " 3271725028: [704],\n",
       " 3796451688: [705],\n",
       " 554178639: [706],\n",
       " 3453792488: [707],\n",
       " 1893629654: [708],\n",
       " 3924069304: [709],\n",
       " 3892832138: [710],\n",
       " 3949287071: [711],\n",
       " 476754780: [712],\n",
       " 2747347526: [713],\n",
       " 3537818194: [714],\n",
       " 2162407766: [715],\n",
       " 3970096019: [716],\n",
       " 524601334: [717],\n",
       " 2028042509: [718],\n",
       " 4121771254: [719],\n",
       " 46687083: [720],\n",
       " 929107951: [721],\n",
       " 3293018394: [722],\n",
       " 742732682: [723],\n",
       " 1147537500: [724],\n",
       " 1642696482: [725],\n",
       " 1430550539: [726],\n",
       " 1856334232: [727],\n",
       " 3510308570: [728],\n",
       " 3968395368: [729],\n",
       " 2724269698: [730],\n",
       " 2237560658: [731],\n",
       " 2944816123: [732],\n",
       " 1100725936: [733],\n",
       " 3282841732: [734],\n",
       " 2514859165: [735],\n",
       " 211297922: [736],\n",
       " 1077926551: [737],\n",
       " 1441630498: [738],\n",
       " 3686935155: [739],\n",
       " 558937896: [740],\n",
       " 3259486668: [741],\n",
       " 3126297081: [742],\n",
       " 3010455159: [743],\n",
       " 641450470: [744],\n",
       " 2374825098: [745],\n",
       " 1516269680: [746],\n",
       " 1063306856: [747],\n",
       " 1951884947: [748],\n",
       " 522428664: [749],\n",
       " 3231677093: [750],\n",
       " 3135799710: [751],\n",
       " 2844145532: [752],\n",
       " 37203346: [753],\n",
       " 2665194430: [754],\n",
       " 3895404984: [755],\n",
       " 256821264: [756],\n",
       " 1825332521: [757],\n",
       " 4193771689: [758],\n",
       " 1626678328: [759],\n",
       " 1463617028: [760],\n",
       " 2662111509: [761],\n",
       " 1459514053: [762],\n",
       " 99027353: [763],\n",
       " 2849228266: [764],\n",
       " 1056011812: [765],\n",
       " 1853482857: [766],\n",
       " 2683224058: [767],\n",
       " 1709619131: [768],\n",
       " 491131434: [769],\n",
       " 3873935598: [770],\n",
       " 2467740297: [771],\n",
       " 892071473: [772],\n",
       " 2410124239: [773],\n",
       " 472254159: [774],\n",
       " 3702643061: [775],\n",
       " 3097220122: [776],\n",
       " 299139894: [777],\n",
       " 110700006: [778],\n",
       " 1258131508: [779],\n",
       " 3482133976: [780],\n",
       " 3298491517: [781],\n",
       " 2237079226: [782],\n",
       " 2579139880: [783],\n",
       " 751749751: [784],\n",
       " 1175478989: [785],\n",
       " 1206980904: [786],\n",
       " 1008380446: [787],\n",
       " 3462970646: [788],\n",
       " 4232178887: [789],\n",
       " 1028836917: [790],\n",
       " 2456139530: [791],\n",
       " 3462834913: [792],\n",
       " 2045816822: [793],\n",
       " 4290505055: [794],\n",
       " 337389135: [795],\n",
       " 2992630849: [796],\n",
       " 347939435: [797],\n",
       " 4180447885: [798],\n",
       " 1345755464: [799],\n",
       " 2740052708: [800],\n",
       " 3956443206: [801],\n",
       " 3340900766: [802],\n",
       " 428549163: [803],\n",
       " 2608543989: [804],\n",
       " 1770523304: [805],\n",
       " 4205761284: [806],\n",
       " 1183309937: [807],\n",
       " 1136509864: [808],\n",
       " 2693083714: [809],\n",
       " 421586005: [810],\n",
       " 1363299595: [811],\n",
       " 1857900197: [812],\n",
       " 2528255053: [813],\n",
       " 2321179843: [814],\n",
       " 997439313: [815],\n",
       " 1733435510: [816],\n",
       " 1642783054: [817],\n",
       " 3745441097: [818],\n",
       " 2148387768: [819],\n",
       " 573293150: [820],\n",
       " 1633263987: [821],\n",
       " 1902921043: [822],\n",
       " 1882883713: [823],\n",
       " 2668685763: [824],\n",
       " 649028999: [825],\n",
       " 2468898182: [826],\n",
       " 1467809542: [827],\n",
       " 2142755647: [828],\n",
       " 1980308275: [829],\n",
       " 2795264631: [830],\n",
       " 1282190480: [831],\n",
       " 1047810173: [832],\n",
       " 2298040175: [833],\n",
       " 2572621038: [834],\n",
       " 3734917090: [835],\n",
       " 1759360542: [836],\n",
       " 3017758716: [837],\n",
       " 798216010: [838],\n",
       " 3033694655: [839],\n",
       " 1333577658: [840],\n",
       " 1428217058: [841],\n",
       " 2633697384: [842],\n",
       " 3016407585: [843],\n",
       " 2562787688: [844],\n",
       " 3952569238: [845],\n",
       " 3849725276: [846],\n",
       " 473538275: [847],\n",
       " 3098089154: [848],\n",
       " 4183789134: [849],\n",
       " 2325542576: [850],\n",
       " 1886452892: [851],\n",
       " 3002800200: [852],\n",
       " 616825218: [853],\n",
       " 1036837546: [854],\n",
       " 1910339245: [855],\n",
       " 409699023: [856],\n",
       " 2102453106: [857],\n",
       " 1066708183: [858],\n",
       " 2312158323: [859],\n",
       " 3701581814: [860],\n",
       " 142411468: [861],\n",
       " 3410375769: [862],\n",
       " 3728680617: [863],\n",
       " 480972362: [864],\n",
       " 1951611940: [865],\n",
       " 3789027182: [866],\n",
       " 920377329: [867],\n",
       " 3807522847: [868],\n",
       " 3579582899: [869],\n",
       " 1109129592: [870],\n",
       " 4141771222: [871],\n",
       " 2978312627: [872],\n",
       " 1921897790: [873],\n",
       " 870386522: [874],\n",
       " 906046937: [875],\n",
       " 1730476324: [876],\n",
       " 1027111849: [877],\n",
       " 3733102523: [878],\n",
       " 2981182600: [879],\n",
       " 516999313: [880],\n",
       " 1473407301: [881],\n",
       " 27733025: [882],\n",
       " 1403285194: [883],\n",
       " 2483352434: [884],\n",
       " 2129137851: [885],\n",
       " 947107369: [886],\n",
       " 111192850: [887],\n",
       " 76912742: [888],\n",
       " 2269110763: [889],\n",
       " 3842362115: [890],\n",
       " 3441655380: [891],\n",
       " 300236626: [892],\n",
       " 362331704: [893],\n",
       " 221893182: [894],\n",
       " 3779243813: [895],\n",
       " 893326926: [896],\n",
       " 2317117961: [897],\n",
       " 2777886967: [898],\n",
       " 2438434714: [899],\n",
       " 3532568266: [900],\n",
       " 984364928: [901],\n",
       " 1933542442: [902],\n",
       " 2588804869: [903],\n",
       " 4139300008: [904],\n",
       " 3365983510: [905],\n",
       " 262906968: [906],\n",
       " 798676219: [907],\n",
       " 2187392019: [908],\n",
       " 162042943: [909],\n",
       " 1829766016: [910],\n",
       " 2588877820: [911],\n",
       " 2179367770: [912],\n",
       " 2458488006: [913],\n",
       " 2688524160: [914],\n",
       " 3761092488: [915],\n",
       " 1720699455: [916],\n",
       " 1447796967: [917],\n",
       " 4244351035: [918],\n",
       " 4207934307: [919],\n",
       " 119655595: [920],\n",
       " 1757155179: [921],\n",
       " 705661752: [922],\n",
       " 3855347794: [923],\n",
       " 2650088968: [924],\n",
       " 618917454: [925],\n",
       " 44776435: [926],\n",
       " 3691014441: [927],\n",
       " 3990432120: [928],\n",
       " 249691528: [929],\n",
       " 1615092494: [930],\n",
       " 2066817557: [931],\n",
       " 1490180841: [932],\n",
       " 2852836897: [933],\n",
       " 1071582440: [934],\n",
       " 550528378: [935],\n",
       " 956750026: [936],\n",
       " 2618041707: [937],\n",
       " 1848651942: [938],\n",
       " 3272728211: [939],\n",
       " 4259189014: [940],\n",
       " 1903272028: [941],\n",
       " 2458828183: [942],\n",
       " 755780811: [943],\n",
       " 1479087506: [944],\n",
       " 679642227: [945],\n",
       " 3946888590: [946],\n",
       " 3996872922: [947],\n",
       " 4072078077: [948],\n",
       " 301084021: [949],\n",
       " 3967790299: [950],\n",
       " 1056020272: [951],\n",
       " 3945526577: [952],\n",
       " 2394136284: [953],\n",
       " 3764379733: [954],\n",
       " 2153037761: [955],\n",
       " 1026634113: [956],\n",
       " 1631274105: [957],\n",
       " 893373776: [958],\n",
       " 1023712594: [959],\n",
       " 849041503: [960],\n",
       " 3340530619: [961],\n",
       " 1788874248: [962],\n",
       " 3773489407: [963],\n",
       " 448741271: [964],\n",
       " 788806703: [965],\n",
       " 708064207: [966],\n",
       " 638775537: [967],\n",
       " 3219737521: [968],\n",
       " 2717151070: [969],\n",
       " 3567369930: [970],\n",
       " 1651087393: [971],\n",
       " 1345571924: [972],\n",
       " 889795193: [973],\n",
       " 777525913: [974],\n",
       " 2534006661: [975],\n",
       " 894275857: [976],\n",
       " 2520498690: [977],\n",
       " 1073720066: [978],\n",
       " 3034550941: [979],\n",
       " 3642792280: [980],\n",
       " 1319886393: [981],\n",
       " 245424953: [982],\n",
       " 864506904: [983],\n",
       " 4266442206: [984],\n",
       " 4107095208: [985],\n",
       " 811590455: [986],\n",
       " 2527738096: [987],\n",
       " 1797539974: [988],\n",
       " 2140131407: [989],\n",
       " 1204184: [990],\n",
       " 1224170949: [991],\n",
       " 1861025224: [992],\n",
       " 1447651663: [993],\n",
       " 1524039717: [994],\n",
       " 3958590279: [995],\n",
       " 3010686555: [996],\n",
       " 33704537: [997],\n",
       " 441988435: [998],\n",
       " 398208897: [999],\n",
       " ...}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dict_eventID"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 创建一个空的Dataframe来存放events.csv中与训练集、测试集event_ID关联的101词频特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T11:28:31.319314Z",
     "start_time": "2018-11-02T11:28:31.243309Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>FE-0</th>\n",
       "      <th>FE-1</th>\n",
       "      <th>FE-2</th>\n",
       "      <th>FE-3</th>\n",
       "      <th>FE-4</th>\n",
       "      <th>FE-5</th>\n",
       "      <th>FE-6</th>\n",
       "      <th>FE-7</th>\n",
       "      <th>FE-8</th>\n",
       "      <th>FE-9</th>\n",
       "      <th>...</th>\n",
       "      <th>FE-91</th>\n",
       "      <th>FE-92</th>\n",
       "      <th>FE-93</th>\n",
       "      <th>FE-94</th>\n",
       "      <th>FE-95</th>\n",
       "      <th>FE-96</th>\n",
       "      <th>FE-97</th>\n",
       "      <th>FE-98</th>\n",
       "      <th>FE-99</th>\n",
       "      <th>FE-100</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>0 rows × 101 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [FE-0, FE-1, FE-2, FE-3, FE-4, FE-5, FE-6, FE-7, FE-8, FE-9, FE-10, FE-11, FE-12, FE-13, FE-14, FE-15, FE-16, FE-17, FE-18, FE-19, FE-20, FE-21, FE-22, FE-23, FE-24, FE-25, FE-26, FE-27, FE-28, FE-29, FE-30, FE-31, FE-32, FE-33, FE-34, FE-35, FE-36, FE-37, FE-38, FE-39, FE-40, FE-41, FE-42, FE-43, FE-44, FE-45, FE-46, FE-47, FE-48, FE-49, FE-50, FE-51, FE-52, FE-53, FE-54, FE-55, FE-56, FE-57, FE-58, FE-59, FE-60, FE-61, FE-62, FE-63, FE-64, FE-65, FE-66, FE-67, FE-68, FE-69, FE-70, FE-71, FE-72, FE-73, FE-74, FE-75, FE-76, FE-77, FE-78, FE-79, FE-80, FE-81, FE-82, FE-83, FE-84, FE-85, FE-86, FE-87, FE-88, FE-89, FE-90, FE-91, FE-92, FE-93, FE-94, FE-95, FE-96, FE-97, FE-98, FE-99, ...]\n",
       "Index: []\n",
       "\n",
       "[0 rows x 101 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#先创建一个空的list来存放新的DataFrame各列的属性名，分别代表101维特征的名字。\n",
    "ColName_List = list() \n",
    "for i in range (101): \n",
    "    ColName_List.append(\"FE-\" + str(i))\n",
    "\n",
    "\n",
    "SubEvents =pd.DataFrame(columns = ColName_List)\n",
    "SubEvents"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 循环查找在events.csv中出现过的事件ID的数据，并放到上面新建的DataFrame里面"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T11:59:21.072113Z",
     "start_time": "2018-11-02T11:28:31.946350Z"
    }
   },
   "outputs": [],
   "source": [
    "fin = open(\"events.csv\", 'r')\n",
    "fin.readline()\n",
    "\n",
    "i=0\n",
    "\n",
    "for EverylineData_row in fin.readlines():\n",
    "    EverylineData = EverylineData_row.strip().split(\",\")\n",
    "    eventId = int(EverylineData[0])\n",
    "    \n",
    "    #以eventID来做参考ID来筛选\n",
    "    if eventId in dict_eventID.keys():         \n",
    "        cor_rowData = list()\n",
    " \n",
    "        for EverylineData_col in range(9, 110):\n",
    "            cor_rowData.append(EverylineData[EverylineData_col])\n",
    "            \n",
    "        #将找到的特征数据放到dataframe里面\n",
    "        SubEvents.loc[i] = cor_rowData\n",
    "        i=i+1\n",
    "fin.close()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "查看一下汇整后的101维词频特征数据的DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T11:59:21.381131Z",
     "start_time": "2018-11-02T11:59:21.077114Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>FE-0</th>\n",
       "      <th>FE-1</th>\n",
       "      <th>FE-2</th>\n",
       "      <th>FE-3</th>\n",
       "      <th>FE-4</th>\n",
       "      <th>FE-5</th>\n",
       "      <th>FE-6</th>\n",
       "      <th>FE-7</th>\n",
       "      <th>FE-8</th>\n",
       "      <th>FE-9</th>\n",
       "      <th>...</th>\n",
       "      <th>FE-91</th>\n",
       "      <th>FE-92</th>\n",
       "      <th>FE-93</th>\n",
       "      <th>FE-94</th>\n",
       "      <th>FE-95</th>\n",
       "      <th>FE-96</th>\n",
       "      <th>FE-97</th>\n",
       "      <th>FE-98</th>\n",
       "      <th>FE-99</th>\n",
       "      <th>FE-100</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>33</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2</td>\n",
       "      <td>8</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>28</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>203</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>71</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>72</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>73</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>74</th>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>14</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>103</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>76</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>78</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>79</th>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>40</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>80</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>81</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>82</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>83</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>84</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>85</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>86</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>87</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>88</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>89</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>90</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>91</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>93</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>94</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>95</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>96</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>97</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>98</th>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>99</th>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>100 rows × 101 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   FE-0 FE-1 FE-2 FE-3 FE-4 FE-5 FE-6 FE-7 FE-8 FE-9  ...   FE-91 FE-92 FE-93  \\\n",
       "0     2    0    2    0    0    0    0    0    0    0  ...       0     1     0   \n",
       "1     2    0    2    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "2     0    0    0    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "3     1    0    2    1    0    0    0    0    0    0  ...       0     0     0   \n",
       "4     1    1    0    0    0    0    0    2    0    0  ...       0     0     0   \n",
       "5     0    0    0    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "6     0    0    0    1    0    0    0    0    0    0  ...       0     0     0   \n",
       "7     0    0    2    0    0   33    0    3    1    0  ...       2     0     0   \n",
       "8     0    0    0    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "9     1    0    1    0    1    0    0    0    0    0  ...       0     0     0   \n",
       "10    0    0    0    3    0    0    0    0    0    0  ...       0     0     0   \n",
       "11    1    1    0    0    0    0    0    2    0    0  ...       0     0     0   \n",
       "12    1    3    1    1    0    0    2    0    0    0  ...       0     0     0   \n",
       "13    1    1    2    1    0    0    1    0    0    0  ...       0     0     0   \n",
       "14    2    8   11    3    2    1    2    2    0    2  ...       0     1     1   \n",
       "15    1    1    0    0    0    0    0    2    0    0  ...       0     0     0   \n",
       "16    1    0    0    1    0    0    0    0    0    0  ...       0     0     1   \n",
       "17    0    0    2    2    0    0    0    1    0    0  ...       0     0     1   \n",
       "18    0    1    0    0    0   28    0    0    0    0  ...       0     0     0   \n",
       "19    0    1    0    0    0    0    0    2    0    0  ...       0     0     2   \n",
       "20    0    0    0    1    0    1    2    0    0    1  ...       0     0     1   \n",
       "21    1    0    3    0    1    0    1    0    0    0  ...       1     0     0   \n",
       "22    1    0    1    1    0    0    0    0    0    0  ...       0     0     0   \n",
       "23    0    1    0    0    0    0    0    2    0    0  ...       0     0     2   \n",
       "24    0    1    0    0    0    0    0    2    0    0  ...       0     0     2   \n",
       "25    0    0    0    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "26    3    2    3    0    0    0    2    4    0    1  ...       0     0     0   \n",
       "27    1    0    1    1    0    1    0    0    0    0  ...       0     0     0   \n",
       "28    1    0    2    1    0    0    0    0    0    0  ...       0     0     0   \n",
       "29    0    1    0    0    0    0    0    2    0    0  ...       0     0     2   \n",
       "..  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...  ...     ...   ...   ...   \n",
       "70    0    0    0    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "71    2    0    2    0    0    0    0    1    0    0  ...       0     0     0   \n",
       "72    1    0    0    0    2    0    0    1    0    0  ...       0     0     0   \n",
       "73    1    0    1    1    0    0    0    1    0    0  ...       0     1     0   \n",
       "74    5    3    3    1    3   14    0    2    0    2  ...       0     0     0   \n",
       "75    1    1    1    2    1    0    1    0    0    0  ...       0     0     0   \n",
       "76    0    0    0    0    0    1    0    0    0    0  ...       0     0     0   \n",
       "77    6    1    2    3    2    0    0    0    1    0  ...       1     0     0   \n",
       "78    1    0    1    1    0    0    0    1    0    0  ...       0     0     1   \n",
       "79    0    3    1    4    4    1    0    1    0    0  ...       0     0     0   \n",
       "80    2    0    0    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "81    0    0    0    0    0    2    0    0    0    0  ...       0     0     0   \n",
       "82    2    1    0    0    0    0    0    0    0    0  ...       0     0     0   \n",
       "83    0    1    0    4    0    5    0    0    0    0  ...       0     0     0   \n",
       "84    0    0    0    0    1    0    0    1    0    0  ...       0     0     1   \n",
       "85    0    0    0    0    1    0    0    0    0    0  ...       0     0     0   \n",
       "86    3    1    4    2    0    0    2    1    1    0  ...       0     0     0   \n",
       "87    5    1    0    0    1    0    1    0    0    0  ...       0     0     0   \n",
       "88    2    0    2    0    0    0    0    1    0    0  ...       0     0     1   \n",
       "89    1    0    2    1    0    0    0    0    0    0  ...       0     0     0   \n",
       "90    0    0    0    0    0    1    0    0    0    0  ...       0     0     0   \n",
       "91    1    0    3    0    1    0    0    0    0    0  ...       1     0     0   \n",
       "92    0    0    0    0    0    2    0    0    0    0  ...       0     0     0   \n",
       "93    0    0    0    0    0    3    0    0    0    0  ...       0     0     0   \n",
       "94    0    1    0    0    0    0    0    2    0    0  ...       0     0     2   \n",
       "95    4    1    2    0    7    7    0    1    1    0  ...       0     0     0   \n",
       "96    0    0    0    0    0    0    0    1    0    0  ...       0     1     0   \n",
       "97    1    0    3    0    1    0    0    0    0    0  ...       1     0     0   \n",
       "98    2    0    0    0    0    0    0    0    0    0  ...       0     1     1   \n",
       "99    1    2    1    1    0    0    2    0    1    0  ...       0     0     0   \n",
       "\n",
       "   FE-94 FE-95 FE-96 FE-97 FE-98 FE-99 FE-100  \n",
       "0      0     0     0     0     0     0      9  \n",
       "1      0     0     0     0     0     0      7  \n",
       "2      0     0     0     0     0     0     12  \n",
       "3      0     0     0     0     0     0      8  \n",
       "4      0     0     0     0     0     0      9  \n",
       "5      0     0     0     0     0     0     22  \n",
       "6      0     0     0     0     0     0     28  \n",
       "7      0     0     0     0     0     0    354  \n",
       "8      0     0     0     0     1     0     25  \n",
       "9      0     0     0     0     0     0      3  \n",
       "10     0     0     0     0     0     0     38  \n",
       "11     0     0     0     0     0     0      9  \n",
       "12     0     0     0     0     0     0     36  \n",
       "13     0     0     1     0     0     1     15  \n",
       "14     0     0     0     0     0     0    120  \n",
       "15     0     0     0     0     0     0      9  \n",
       "16     0     0     0     0     0     0      7  \n",
       "17     0     0     0     0     0     0      8  \n",
       "18     0     0     0     0     0     0     90  \n",
       "19     0     0     0     0     0     0      6  \n",
       "20     0     0     0     0     0     0     17  \n",
       "21     0     0     0     0     0     0      7  \n",
       "22     0     0     0     0     0     0      9  \n",
       "23     0     0     0     0     0     0      6  \n",
       "24     0     0     0     0     0     0      6  \n",
       "25     0     0     0     0     0     0      4  \n",
       "26     0     0     0     0     0     0     28  \n",
       "27     0     0     0     0     0     0      9  \n",
       "28     0     0     0     0     0     0     10  \n",
       "29     0     0     0     0     0     0      6  \n",
       "..   ...   ...   ...   ...   ...   ...    ...  \n",
       "70     0     0     0     0     0     0    203  \n",
       "71     0     0     0     0     0     0      9  \n",
       "72     0     0     0     0     0     0      4  \n",
       "73     0     0     0     0     0     0      8  \n",
       "74     0     1     0     0     0     0    103  \n",
       "75     0     0     0     0     0     0     20  \n",
       "76     0     0     0     0     0     0     10  \n",
       "77     0     0     0     0     0     1     40  \n",
       "78     0     0     0     0     0     0      8  \n",
       "79     0     0     0     0     1     0     40  \n",
       "80     0     0     0     0     0     0      5  \n",
       "81     0     0     0     0     0     0     53  \n",
       "82     0     0     0     0     0     0      8  \n",
       "83     0     0     0     0     0     0    165  \n",
       "84     0     0     0     0     0     0      6  \n",
       "85     0     0     0     0     0     0      5  \n",
       "86     0     0     1     0     0     0     35  \n",
       "87     0     0     0     0     0     0     21  \n",
       "88     0     0     0     0     0     0      9  \n",
       "89     0     0     0     0     0     0      9  \n",
       "90     0     0     0     0     0     0     33  \n",
       "91     0     0     0     0     0     0     11  \n",
       "92     0     0     0     0     0     0     57  \n",
       "93     0     0     0     0     0     0     59  \n",
       "94     0     0     0     0     0     0      6  \n",
       "95     0     0     0     0     0     0    106  \n",
       "96     0     0     0     0     0     0      5  \n",
       "97     0     0     0     0     0     0     11  \n",
       "98     0     0     0     0     0     0      8  \n",
       "99     0     0     0     0     0     0     22  \n",
       "\n",
       "[100 rows x 101 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "SubEvents.head(100)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 模型建立与调试"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T12:57:48.947752Z",
     "start_time": "2018-11-02T12:57:48.916751Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from sklearn.cluster import MiniBatchKMeans\n",
    "from sklearn import metrics\n",
    "\n",
    "def K_cluster_analysis(K, dataframe):\n",
    "    print(\"K-means begin with clusters: {}\".format(K));\n",
    "    \n",
    "    #K-means\n",
    "    mb_kmeans = MiniBatchKMeans(n_clusters = K)\n",
    "    mb_kmeans.fit(dataframe)\n",
    "    \n",
    "    cluster_predict = mb_kmeans.predict(dataframe)\n",
    "\n",
    "    CH_score = metrics.silhouette_score(dataframe,cluster_predict)   \n",
    "    print(\"CH_score: {}\".format(CH_score))\n",
    "\n",
    "    return CH_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T13:01:49.126490Z",
     "start_time": "2018-11-02T12:57:51.696910Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters: 10\n",
      "CH_score: 0.4041846576240598\n",
      "K-means begin with clusters: 20\n",
      "CH_score: 0.22462354291148562\n",
      "K-means begin with clusters: 30\n",
      "CH_score: 0.2179376089408413\n",
      "K-means begin with clusters: 40\n",
      "CH_score: 0.1281126155355321\n",
      "K-means begin with clusters: 50\n",
      "CH_score: 0.1388093736427373\n",
      "K-means begin with clusters: 60\n",
      "CH_score: 0.1262196126727913\n",
      "K-means begin with clusters: 70\n",
      "CH_score: 0.13781503527795644\n",
      "K-means begin with clusters: 80\n",
      "CH_score: 0.09449795759711373\n",
      "K-means begin with clusters: 90\n",
      "CH_score: 0.09590380617479345\n",
      "K-means begin with clusters: 100\n",
      "CH_score: 0.09382185976238883\n"
     ]
    }
   ],
   "source": [
    "# 设置超聚类数目K的范围\n",
    "CH_scores = []\n",
    "Ks = [10,20,30,40,50,60,70,80,90,100]\n",
    "for K in Ks:\n",
    "    ch = K_cluster_analysis(K, SubEvents)\n",
    "    CH_scores.append(ch)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-11-02T13:01:49.547514Z",
     "start_time": "2018-11-02T13:01:49.136490Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x153644e0>]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAHutJREFUeJzt3X2clXWd//HXhxkGudEUGFO5cYCF\nlCxBD4gG3qWCzgTZ1gZaP2trMVey0vLm57quqGVaaW2WutWvrU2Jyl+xJKIRtpJBzAhIQMgIBiMW\no4Ca4MDAZ//4nmnO3MC5ZubMXOec6/18PM7jzHV3zuccLt7Xdb7X97ouc3dERCQZesVdgIiI9ByF\nvohIgij0RUQSRKEvIpIgCn0RkQRR6IuIJIhCX0QkQRT6IiIJotAXEUmQ0rgLaG3w4MFeUVERdxki\nIgWlpqbmFXcvzzZf3oV+RUUF1dXVcZchIlJQzOxPUeZT846ISIIo9EVEEkShLyKSIAp9EZEEUeiL\niCSIQl9EJEEU+iIiCRIp9M1smpltNLNaM7vxMPN90MzczFIZ425KL7fRzKbmouj2vPoqzJ0Lq1d3\n1zuIiBS+rCdnmVkJcD9wIVAHrDSzBe6+vtV8RwLXACsyxo0FZgLvBE4AfmVmY9z9QO4+QlBSEkJ/\n714YNy7Xry4iUhyi7OlPBGrdfbO77wPmATPame924G7grYxxM4B57t7g7luA2vTr5dzRR8OUKfDL\nX3bHq4uIFIcooT8E2JYxXJce9zdmNh4Y5u4LO7psLlVWwtq18KdIJyOLiCRPlNC3dsb53yaa9QLu\nBa7r6LIZrzHbzKrNrLq+vj5CSe2rqgrP2tsXEWlflNCvA4ZlDA8FtmcMHwmcAjxlZi8Ck4AF6YO5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9OzJeK7AHD3PwPbzOwd6VHvBdaTwHUjbSswycz6pf/fNH0fiVw/\nMhxqfVgA/J90L55JwGtNzUBdoZOzusjMJgNPA2tpbsf+v4R2/fnAcMLK/iF33xlLkTEws3OBz7t7\nlZmNJOz5DwRWAR9x94Y46+spZjYO+A5QBmwGPk7Y2UrkumFmtwEfJvR6WwV8ktBOnYj1w8weAc4l\nXE3zL8CtwM9pZ31Ibxi/Sejtswf4uLtXd7kGhb6ISHKoeUdEJEEU+iIiCaLQFxFJEIW+iEiCKPRF\nRBJEoS8ikiAKfRGRBFHoi4gkyP8CMiQbOTbGNT4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x154054a8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(CH_scores), 'b-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "总体来说，聚类数目K越小，CH_score越大，即性能越好。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
